{% extends "registration/registration_base.html" %}

{% load i18n %}

{% block title %}{% trans "Login" %}{% endblock %}
{% block content %}


    <div class="account-container login stacked">

        <div class="content clearfix">

            <form action="{% url django.contrib.auth.views.login %}" method="post">{% csrf_token %}

                <h1>{% trans "Sign In" %}</h1>

                <div class="login-fields">

                    <p>{% trans "Sign in using your registered account:" %}</p>

                    <div class="field">
                        <label for="{{ form.fields.password.auto_id }}">{{ form.username.label_tag }}</label>
                        <input type="text" id="{{ form.fields.username.auto_id }}" name="{{ form.fields.username.name }}" value="" placeholder="{% trans "Username" %}" class="login username-field" />
                    </div> <!-- /field -->

                    <div class="field">
                        <label for="{{ form.fields.password.auto_id }}">{{ form.username.label_tag }}</label>
                        <input type="password" id="{{ form.fields.password.auto_id }}" name="{{ form.fields.password.name }}" value="" placeholder="{% trans "Password" %}" class="login password-field"/>
                    </div> <!-- /password -->

                </div> <!-- /login-fields -->

                <div class="login-actions">

				<span class="login-checkbox">
					<input id="Field" name="Field" type="checkbox" class="field login-checkbox" value="First Choice" tabindex="4" />
					<label class="choice" for="Field">{% trans "Keep me signed in" %}</label>
				</span>

                    <button class="button btn btn-primary btn-large">{% trans "Sign In" %}</button>

                </div> <!-- .actions -->
                <!--
                <div class="login-social">
                    <p>Sign in using social network:</p>

                    <div class="twitter">
                        <a href="#" class="btn_1">Login with Twitter</a>
                    </div>

                    <div class="fb">
                        <a href="#" class="btn_2">Login with Facebook</a>
                    </div>
                </div>
                -->

            </form>

        </div> <!-- /content -->

    </div> <!-- /account-container -->


    <!-- Text Under Box -->
    <div class="login-extra">
        {% trans "Don't have an account?" %} <a href="{% url registration_register %}">{% trans "Sign Up" %}</a><br/>
        {% url auth_password_reset as the_password_reset_url %}
        {% blocktrans %}Remind <a href="{{ the_password_reset_url }}">Password</a>{% endblocktrans %}
    </div> <!-- /login-extra -->



</form>
{% endblock %}

{% block message %}
    {% if form.errors %}
        <script>
            $.msgGrowl ({
                title: '{% trans "Error" %}' // Optional
                ,text: '{% trans "Your username and password didn't match. Please try again." %}',
                position: "top-center",
                type:"error"
            });
        </script>
    {% endif %}
{%  endblock %}
